package org.gnomus.server;

import com.google.appengine.api.utils.SystemProperty;

import java.util.*;

public class C {

    public static final boolean DEBUG = true;
    public static final boolean ENABLE_ACCESS_LOG = true;
    public static final boolean PRODUCTION =
            SystemProperty.environment.value() == SystemProperty.Environment.Value.Production;

    public static final String APPENGINE_UA = "AppEngine-Google";
    public static final String ACCESS_LOG_URI = "/access.log";
    public static int USER_REMEMBER_TIME = 60 * 60 * 24 * 7; // one week in seconds


    public static String PERIODIC_SQUARES = "Periodic Squares";
    public static String BALANCING_EQUATIONS = "Balancing Equations";
    public static String[] GAME_TYPES = {PERIODIC_SQUARES, BALANCING_EQUATIONS};
    public static final Map<String, Object> PS_SAMPLE_DATA;
    static {
        PS_SAMPLE_DATA = new HashMap<String,Object>();
        PS_SAMPLE_DATA.put("name", "PS Sample");
        PS_SAMPLE_DATA.put("type", PERIODIC_SQUARES);
        
        Map<String, Object> gb = new HashMap<String, Object>(); // game board
        gb.put("removed_elements", Arrays.asList("Li", "Mg", "F", "He"));
        List<Map> gbs = new ArrayList<Map>();
        gbs.add(gb);
        PS_SAMPLE_DATA.put("game_board", gbs);
    }

    public static final Map<String, Object> BE_SAMPLE_DATA;
    static {
        BE_SAMPLE_DATA = new HashMap<String, Object>();
        BE_SAMPLE_DATA.put("name", "BE Sample");
        BE_SAMPLE_DATA.put("type", BALANCING_EQUATIONS);
    }

    public static Map<String, String> LESSON_TOPICS;
    static  {
        LESSON_TOPICS = new LinkedHashMap<String, String>();
        LESSON_TOPICS.put("som", "Structure of Matter");
        LESSON_TOPICS.put("pt", "Periodic Table");
    }

    public static Map<String, String> LESSON_ITEM_TYPES;
    static {
        LESSON_ITEM_TYPES = new LinkedHashMap<String, String>();
        LESSON_ITEM_TYPES.put("info", "Info");
        LESSON_ITEM_TYPES.put("test", "Test");
    }

    public static Map<String, String> ACTIVITY_TYPES;
    static {
        ACTIVITY_TYPES = new LinkedHashMap<String, String>();
        ACTIVITY_TYPES.put("drag_and_drop", "Drag and Drop");
        ACTIVITY_TYPES.put("construct", "Construct");
    }

    public static final Map<String, String> DRAG_AND_DROP_SUBTYPES;
    static {
        DRAG_AND_DROP_SUBTYPES = new LinkedHashMap<String, String>();
        DRAG_AND_DROP_SUBTYPES.put("images", "Images to Categories");
        DRAG_AND_DROP_SUBTYPES.put("isotopes", "Isotopes");
        DRAG_AND_DROP_SUBTYPES.put("squares", "Periodic Squares");
        DRAG_AND_DROP_SUBTYPES.put("molecules", "Molecules to Reaction");
    }

    public static Map<String, String> CONSTRUCT_SUBTYPES;
    static {
        CONSTRUCT_SUBTYPES = new LinkedHashMap<String, String>();
        CONSTRUCT_SUBTYPES.put("atom", "an Atom");
        CONSTRUCT_SUBTYPES.put("molecule", "a Molecule");
        CONSTRUCT_SUBTYPES.put("reaction", "a Reaction");
    }

    public static Map<String, String> ELEMENT_SYMBOL_TO_NAME;
    static {
        ELEMENT_SYMBOL_TO_NAME = new LinkedHashMap<String, String>();
        ELEMENT_SYMBOL_TO_NAME.put("H",  "Hydrogen");
        ELEMENT_SYMBOL_TO_NAME.put("He", "Helium");

        ELEMENT_SYMBOL_TO_NAME.put("Li", "Lithium");
        ELEMENT_SYMBOL_TO_NAME.put("Be", "Beryllium");
        ELEMENT_SYMBOL_TO_NAME.put("B",  "Boron");
        ELEMENT_SYMBOL_TO_NAME.put("C",  "Carbon");
        ELEMENT_SYMBOL_TO_NAME.put("N",  "Nitrogen");
        ELEMENT_SYMBOL_TO_NAME.put("O",  "Oxygen");
        ELEMENT_SYMBOL_TO_NAME.put("F",  "Fluorine");
        ELEMENT_SYMBOL_TO_NAME.put("Ne", "Neon");

/*
        ELEMENT_SYMBOL_TO_NAME.put("Na", "Sodium");
        ELEMENT_SYMBOL_TO_NAME.put("Mg", "Magnesium");
        ELEMENT_SYMBOL_TO_NAME.put("Al", "Aluminum");
        ELEMENT_SYMBOL_TO_NAME.put("Si", "Silicon");
        ELEMENT_SYMBOL_TO_NAME.put("P", "Phosphorus");
        ELEMENT_SYMBOL_TO_NAME.put("S",  "Sulfur");
        ELEMENT_SYMBOL_TO_NAME.put("Cl", "Chlorine");
        ELEMENT_SYMBOL_TO_NAME.put("Ar", "Argon");
*/
    }

    public static Map<String, String> MOLECULAR_FORMULA_TO_NAME;
    static {
        MOLECULAR_FORMULA_TO_NAME = new LinkedHashMap<String, String>();
        MOLECULAR_FORMULA_TO_NAME.put("HCl", "Hydrochloric Acid");
        MOLECULAR_FORMULA_TO_NAME.put("CO", "Carbon Monoxide");
//        MOLECULAR_FORMULA_TO_NAME.put("NO", "Nitric Oxide");
        MOLECULAR_FORMULA_TO_NAME.put("NaCl", "Sodium Chloride");
    }

    public static Map<String, String> VALID_ISOTOPES;
    static {
        VALID_ISOTOPES = new LinkedHashMap<String, String>();
        VALID_ISOTOPES.put("H-1", "Protium (Hydrogen-1)");
        VALID_ISOTOPES.put("H-2", "Deuterium (Hydrogen-2)");
        VALID_ISOTOPES.put("H-3", "Tritium (Hydrogen-3)");
        VALID_ISOTOPES.put("He-3", "Helium-3");
        VALID_ISOTOPES.put("He-4", "Helium-4");
        VALID_ISOTOPES.put("He-5", "Helium-5");
        VALID_ISOTOPES.put("He-6", "Helium-6");
/*
        VALID_ISOTOPES.put("Li-6", "Lithium-6");
        VALID_ISOTOPES.put("Li-7", "Lithium-7");
        VALID_ISOTOPES.put("Li-8", "Lithium-8");
        VALID_ISOTOPES.put("Be-9", "Beryllium-9");
        VALID_ISOTOPES.put("Be-10", "Beryllium-10");
        VALID_ISOTOPES.put("C-12", "Carbon-12");
        VALID_ISOTOPES.put("C-13", "Carbon-13");
        VALID_ISOTOPES.put("C-14", "Carbon-14");
*/
    }
}
